{extend name="common:base" /}
{block name="content"}
<div class="row">
<form class="form-horizontal" action="{:url('save')}" method="post">
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="cid"> 文章分类 </label>
    <div class="col-sm-9">
    <select id="cid" name="cid" class="col-xs-10 col-sm-5">
        {volist name="category" id="v"}
        <option value="{$v.id}">{$v.name}</option>
        {notempty name="v.children"}
        {volist name="v.children" id="vv"}
        <option value="{$vv.id}">┣━{$vv.name}</option>
        {notempty name="vv.children"}
        {volist name="vv.children" id="vvv"}
        <option value="{$vvv.id}">┣━━{$vvv.name}</option>
        {notempty name="vvv.children"}
        {volist name="vvv.children" id="vvvv"}
        <option value="{$vvvv.id}">┣━━{$vvvv.name}</option>
        {/volist}
        {/notempty}
        {/volist}
        {/notempty}
        {/volist}
        {/notempty}
        {/volist}
    </select>
    <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="title"> 文章标题 </label>
    <div class="col-sm-9">
        <input type="text" name="title" id="title" class="col-xs-10 col-sm-5" value="" required="required">
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="stick"> 文章置顶 </label>
    <div class="control-label no-padding-left col-sm-1">
        <label>
            <input name="stick" id="stick" value="1" class="ace ace-switch ace-switch-2" type="checkbox" />
            <span class="lbl"></span>
        </label>
    </div>
    <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
    </span>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="image"> 缩略图 </label>
    <div class="col-sm-9">
        <div class="col-xs-10 col-sm-5">{:UploadImage("image",100,100,'')}</div>
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle">仅支持jpg、gif、png、bmp、jpeg。</span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="keywords"> 关键词 </label>
    <div class="col-sm-9">
        <input type="text" name="keywords" id="keywords" class="col-xs-10 col-sm-5" value="" required="required">
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="description"> 文章摘要 </label>
    <div class="col-sm-9">
        <textarea name="description" id="description" placeholder="文章摘要" class="col-xs-10 col-sm-5" rows="5"></textarea>
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>
<div class="space-4"></div>
<div class="form-group">
    <label class="col-sm-1 control-label no-padding-right" for="description"> 文章内容 </label>
    <div class="col-sm-9">
        <script name="content" id="editor" type="text/plain" class="col-xs-10 col-sm-10 col-md-10 col-lg-12" style="height:500px;"></script>
        <span class="help-inline col-xs-12 col-sm-7">
            <span class="middle"></span>
        </span>
    </div>
</div>

<div class="space-4"></div>
<div class="col-md-offset-2 col-md-9">
    <button id="submit" class="btn btn-info" type="submit">
        <i class="icon-ok bigger-110"></i>
        提交
    </button>

    &nbsp; &nbsp; &nbsp;
    <button class="btn" type="reset">
        <i class="icon-undo bigger-110"></i>
        重置
    </button>
</div>
</form>
</div>
{/block}
{block name="js_file"}
<script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__STATIC__/ueditor/lang/zh-cn/zh-cn.js"></script>
{/block}
{block name="javascript"}
<script type="text/javascript">
    $(function(){
        var ue = UE.getEditor('editor');
    })
</script>
{/block}